package com.scilvet.reportcomposer.node;

import com.scilvet.reportcomposer.account.Amount;

public class Division extends BinaryExpression {
	
	public Division(Node leftNode, Node rightNode) {
		super(leftNode, rightNode);
	}

	@Override
	public Amount getValue() {
		
		Amount leftAmount = leftNode.getValue();
		Amount rightAmount = leftNode.getValue();
		
		return leftAmount.divide(rightAmount);
	}

	@Override
	public String toString() {
		return leftNode + " / " + rightNode;
	}
	
	public String printValues() {
		return leftNode.printValues() + " / " + rightNode.printValues();
	}
}
